<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>购物车-九果十代</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="${ctx}/mobielresouce/styles/app.css"/>
    <link rel="stylesheet" href="${ctx}/mobielresouce/styles/costom.css"/>
</head>
<body>
<style>
    .tools input{width: 30px;height: 21px;text-align: center;font-size: 14px;color: #333;background: #f1f1f1;}
    .tools .ui-btn-s{right: 0;}
    .ui-list-info{padding-right: 55px;}
</style>
    <div id="page1" class="-ui-hide">
        <header class="ui-menu ui-tooltips-guide">
            <div class="ui-menu-cnt ui-border-b">
                <a href="#" class="ui-btn ui-fl">返回</a>
                <span class="ui-title">购物车</span>
            </div>
        </header>

        <section class="ui-constom-block">
            <h3>已选商品</h3>
            <ul class="ui-list">
            	<%for(item in items){%>
					<li>
	                    <div class="ui-avatar-lg">
	                        <span style="background-image:url(http://placehold.sinaapp.com/?100*100)"></span>
	                    </div>
	                    <div class="ui-list-info ui-border-t">
	                        <h4><td>${item.goods_number}</td></h4>
	                        <p>颜色：黄色</p>
	                        <p class="tools">
	                            48.00 X <input type="text" value="1"/>
	
	                            <a class="ui-btn-s ui-btn-danger">删除</a>
	                        </p>
	                    </div>
	                </li>
				<%}%>
                
                <li>
                    <div class="ui-avatar-lg">
                        <span style="background-image:url(http://placehold.sinaapp.com/?100*100)"></span>
                    </div>
                    <div class="ui-list-info ui-border-t">
                        <h4>很长很长很长很长很长的名称...</h4>
                        <p>颜色：黄色</p>
                        <p class="tools">
                            48.00 X <input type="text" value="1"/>

                            <a class="ui-btn-s ui-btn-danger">删除</a>
                        </p>
                    </div>
                </li>
            </ul>
        </section>

        <section id="currentAccount" class="ui-constom-block ui-center">
            <p>当前登录账号：134786789768</p>
            <a href="javascript:;" class="ui-btn-s ui-mt10">更换账号</a>
        </section>

        <section id="currentReg" class="ui-constom-block" style="padding: 0">
            <form class="ui-form" action="">
                <div class="ui-form-item ui-border-b">
                    <label>手机号码</label>
                    <input type="text" id="mobile" placeholder="手机号码">
                    <a href="#" class="ui-icon-close"></a>
                </div>
                <div class="ui-form-item ui-border-b" style="padding-right: 15px;">
                    <input type="button" class="ui-btn ui-btn-primary" value="确认手机号" style="margin-top: 6px;padding: 0;">
                </div>
                <div class="ui-form-item ui-border-b">
                    <label>验证码</label>
                    <input type="text" placeholder="手机验证码">
                    <a href="#" class="ui-icon-close"></a>
                </div>
                <div class="ui-form-item ui-border-b">
                    <label>登陆密码</label>
                    <input type="text" placeholder="请输入登陆密码">
                    <a href="#" class="ui-icon-close"></a>
                </div>
                <div class="ui-form-item ui-border-b" style="padding-right: 15px;">
                    <input type="button" class="ui-btn ui-btn-primary" value="登陆" style="margin-top: 6px;padding: 0;">
                </div>
            </form>
        </section>

        <section id="goPay" class="ui-goPay-bottom">
            <div class="ui-btn-wrap">
                <button class="ui-btn-lg ui-btn-primary">
                    <span>应付：388元</span>，去结算
                </button>
            </div>
        </section>
    </div>

<script src="${ctx}/mobielresouce/js/lib/sea.js"></script>
    <script>
        seajs.config({
            alias:{
                alias:{
	                'zepto'     : '${ctx}/mobielresouce/js/lib/zepto.js',
	                'frozen'    : '${ctx}/mobielresouce/js/lib/frozen.js',
	                'handlebars': '${ctx}/mobielresouce/js/handlebars-v3.0.1.js'
                }
            }
        });
        seajs.use(['zepto', 'frozen'],function(z,fz){
            // document ready
            $('#mobile').on('blur', function(){
                if($(this).val().length!=11) {
                    alert('手机号码不正确')
                }
            });

            // 如果未登录，隐藏结算按钮
            var ISLOGIN = false;

            if (!ISLOGIN) {
                $('#goPay, #currentAccount').hide();
            } else {
                $('#currentReg').hide();
            }

        })
    </script>
</body>
</html>